<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta
      name="viewport"
      content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"
    />
    <title>Complete Test Suite - Elix</title>

    <link rel="stylesheet" href="../node_modules/mocha/mocha.css" />
    <script
      src="../node_modules/mocha/mocha.js"
      type="text/javascript"
    ></script>
    <script src="../node_modules/chai/chai.js" type="text/javascript"></script>
    <script
      src="../node_modules/sinon/pkg/sinon.js"
      type="text/javascript"
    ></script>

    <script>
      mocha.setup("bdd");
      window.assert = chai.assert;
    </script>

    <script type="module">
      import * as tests from "./tests.js";
      const errors = [];
      mocha
        .run()
        .on("fail", function(_, err) {
          errors.push(err.stack);
        })
        .on("end", function() {
          console.log(`${this.failures ? JSON.stringify(errors) : "OK"}`);
        });
    </script>
  </head>

  <body>
    <!-- Required for browser reporter -->
    <div id="mocha"></div>

    <!-- Where tests can put elements -->
    <div id="container"></div>
  </body>
</html>
